One of a series of functions able to generate a set of variations from a symbol-pattern. The 'theme' symbol-pattern is stated first in the output followed sequentially by number of variants.
(setq mel (gen-variants 0.343 3 '(a (1 b) c d)))
--> (a (1 b) c d a a d d c d a (1 b) c (1 b) c (1 b))
Use with note-lengths or velocities or within pick operations to control templates. Should you wish to remove the 'theme' from the output statement use the nthcdr function:
(setq mel1 (nthcdr 4 (gen-variants nil 3 '(a b c d))))